package com.example.vo;

import com.example.generator.domain.TBill;
import lombok.Data;

/**
 * @author ：chengyoubang
 * @version ：V1.0
 * @program ：hmall
 * @date ：Created in 2024/11/15 22:20
 * @description ：
 */
@Data
public class BillVo {
    private Integer inComeBillId;
    private String inComeBillDate="";
    private String inComeBillDesc="";
    private String inComeBillAmount="";
    private String outComeBillDate="";
    private String outComeBillDesc="";
    private String outComeBillAmount="";
    private Integer outComeBillId;

    public void setIncomeData(TBill tBill){
        inComeBillAmount=tBill.getBillAmount().toString();
        inComeBillDate=tBill.getBillDate();
        inComeBillDesc=tBill.getBillDesc();
        inComeBillId=tBill.getId();
    }

    public void setOutcomeData(TBill tBill){
        outComeBillAmount=tBill.getBillAmount().toString();
        outComeBillDate=tBill.getBillDate();
        outComeBillDesc=tBill.getBillDesc();
        outComeBillId=tBill.getId();
    }

    public String getInComeBillDate() {
        return inComeBillDate==null?"":inComeBillDate;
    }

    public String getOutComeBillDate() {
        return outComeBillDate==null?"":outComeBillDate;
    }

    public String getInComeBillDesc() {
        return inComeBillDesc==null?"":inComeBillDesc;
    }

    public String getInComeBillAmount() {
        return inComeBillAmount.equals("0")?"":inComeBillAmount;
    }

    public String getOutComeBillDesc() {
        return outComeBillDesc==null?"":outComeBillDesc;
    }

    public String getOutComeBillAmount() {
        return outComeBillAmount.equals("0")?"":outComeBillAmount;
    }
}

